package drone.iqgc.dao.entity.core ;

import java.math.BigDecimal ;
import java.util.List ;
import java.util.Map ;

import drone.basis.meta.MethodMeta ;
import org.apache.ibatis.annotations.Mapper ;
import drone.facade.model.entity.core.CoreMissionEntity ;

@Mapper
public interface ICoreMissionDao 
{

	// DML

	@MethodMeta ( name = "删除数据" , description = "按主键删除数据" )
	public Integer delete (
			String primaryKey
	) throws Exception ;

	@MethodMeta ( name = "删除数据" , description = "按条件删除数据" )
	public Integer clear (
			Map < String , String > paramMap
	) throws Exception ;

	@MethodMeta ( name = "插入数据" , description = "插入一条数据" )
	public Integer insert (
			CoreMissionEntity paramObject
	) throws Exception ;

	@MethodMeta ( name = "插入数据" , description = "插入多条数据" )
	public Integer batch (
			List < CoreMissionEntity > paramList
	) throws Exception ;

	@MethodMeta ( name = "更新数据" , description = "更新一条数据" )
	public Integer update (
			CoreMissionEntity paramObject
	) throws Exception ;
	
	@MethodMeta ( name = "更新数据" , description = "按主键集合更新多条数据" )
	public Integer change (
			Map < String , String > paramMap
	) throws Exception ;

	/// DQL

	@MethodMeta ( name = "获取单个数据" , description = "按主键取一条数据" )
	public CoreMissionEntity obtain (
			String primaryKey
	) throws Exception ;

	@MethodMeta ( name = "获取单个数据" , description = "按查询条件取第一条数据" )
	public CoreMissionEntity unique (
			Map < String , String > paramMap
	) throws Exception ;

	@MethodMeta ( name = "获取单个数据" , description = "按查询条件随机取一条数据" )
	public CoreMissionEntity random (
			Map < String , String > paramMap
	) throws Exception ;

	@MethodMeta ( name = "汇总数据" , description = "按条件汇总运算返回浮点数" )
	public BigDecimal total (
			Map < String , String > paramMap
	) throws Exception ;
	
	@MethodMeta ( name = "平均数据" , description = "按条件平均运算返回浮点数" )
	public BigDecimal average (
			Map < String , String > paramMap
	) throws Exception ;

	@MethodMeta ( name = "汇总数据" , description = "按条件获取结果记录集条数返回整数" )
	public Integer count (
			Map < String , String > paramMap
	) throws Exception ;

	@MethodMeta ( name = "获取数据集合" , description = "按查询条件返回数据集合" )
	public List < CoreMissionEntity > query (
			Map < String , String > paramMap
	) throws Exception ;

}
